import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopStoreApplyController } from '../../../controllers';
const uctoominishopStoreApplyRouter = new Router();
const minishopStoreApplyController = new uctooMinishopStoreApplyController();

uctoominishopStoreApplyRouter.post('/add', requireUser, minishopStoreApplyController.add);
uctoominishopStoreApplyRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_store_apply'), minishopStoreApplyController.edit);
uctoominishopStoreApplyRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_store_apply'), minishopStoreApplyController.delete);

//For getting minishopStoreApply with permission control
uctoominishopStoreApplyRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_store_apply'), minishopStoreApplyController.getSingle);
uctoominishopStoreApplyRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_store_apply'), minishopStoreApplyController.getMany);
uctoominishopStoreApplyRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_store_apply'), minishopStoreApplyController.getMany);

//#endregion AutoCreateCode
export default uctoominishopStoreApplyRouter;
